package cn.wolfcode.luowowo.article.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
public class TicketDetail implements Serializable {

    private int peopleCatalogName;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date accessTime;

    private Integer num;

    private Integer tocket_id;

    private BigDecimal price;
    private String name;
    private String benefit;
    private String losc;

    public String getPeopleCatalogName() {
        if (peopleCatalogName == Ticket.TICKET_PEOPLE_TYPE_CHIRLD) {
            return "儿童票";
        } else if (peopleCatalogName == Ticket.TICKET_PEOPLE_TYPE_ADULT) {
            return "成人票";
        } else if (peopleCatalogName == Ticket.TICKET_PEOPLE_TYPE_OLDER) {
            return "老人票";
        } else {
            return "学生票";
        }

    }



}